home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 2.0 KB | 50 lines | [TEXT/GEOL] |
- Item 8834624 12-July-90 12:59PDT
-
- From: VERITY Verity, Bob Williams,PRT
-
- To: MACDTS Macintosh Developer Tech Supt
- MACAPP.TECH$ MacApp Technical
-
- Sub: Wrapping TEditText...
-
- Hi,
-
- I am having trouble getting TEditText to auto-wrap, as advertized in the MacApp
- source code and the 2.0 Final change document. I've tried it two ways - (1)
- overriding TEditText and calling ChangeWrap after calling IEditText and (2) not
- overriding, and calling ChangeWrap after calling IEditText. In both cases, as
- soon as I click in the TEditText to activate it, I get an error from
- TApplication.TrackCursor:
-
- "Whoops, cursor region was not correctly calculated.
- global cursor = (h:197,v:69) gCursorRgn^^.rgnBBox = (l:0, t:0)/(r:0, b:0)
- ProgramBreak: The cursor is not in the cursor region at end of
- TApplication.TrackCursor!"
-
- I've traced through the code, and the reason gCursorRgn is set to (0,0,0,0) is
- because of the following snippet from TApplication.TrackCursor:
-
- { Intersect with visible region }
- SectRgn(thePort^.visRgn, gCursorRgn, gCursorRgn);
- SectRgn(thePort^.clipRgn, gCursorRgn, gCursorRgn);
-
-
- In the case where I have set fAutoWrap to true, thePort^.visRgn is (0,0,0,0),
- and gCursorRgn (which wasn't (0,0,0,0) before the first SectRgn call) gets
- blown away. This error doesn't happen if I don't call ChangeWrap to set
- fAutoWrap to true, but I can't figure out what in the code is causing the
- visRgn to get set to (0,0,0,0) - unless this is a side-effect of debugging with
- SADE.
-
- So, am I doing something wrong, or is MacApp? Does MacApp 2.0 Final really
- support multi-line, auto-wrapping TEditText's, or is that just a rumor
- propagated by comments in the code and in the release notes? If it does
- support it, has anyone gotten it to work? Am I barking up the wrong tree, and
- should I start looking at the views that contain this particular TEditText?
-
- Anders Wallgren
- Verity, Inc.
- Applelink: VERITY
-
-
-